<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    var name ='jack';
    var age = 18;
    var sayHi = function(){
        console.log('say hi');
    }
    var name1 = 'andy';
    var age1 = 19;
    var sayHi = function(){
        console.log('say hi');
    }
    var name2 = '老周';
    var age2 = 29;
    var sayHi2 = function(){
        console.log('say hi');
    }

    console.log(name1);
    console.log(name2);
    console.log(name3);
    
    var obj1 = {
        name:'andy',
        age:18,
        sayHi:function (){
            console.log('say hi');
            
        }
    }
    console.log(obj1.name);
    console.log(obj2.name);
    </script>
</body>
</html>